package com.example.shopping.controller;

import com.example.shopping.model.Order;
import com.example.shopping.service.impl.OrderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletResponse;

@RestController
@RequestMapping("/orders")
public class OrderController {
    @Autowired
    private OrderService orderService;

    @PostMapping("/importExcel")
    public void createOrder(HttpServletResponse response) throws Exception {
        orderService.createOrder(response);
    }
    @PostMapping("/createOrder")
    public void createOrder() {
        orderService.createOrder();
    }

    public static void main(String[] args) {
        System.out.println(1749781577414L % 2);
        System.out.println(1749781577382L % 2);
        System.out.println(1749781577362L % 2);
    }
}
